New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@govuk-react/button

Package Overview
Dependencies
Maintainers
5
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@govuk-react/button

Styled button component with configurable properties.

  • 0.5.1
  • npm
  • Socket score

Version published
Weekly downloads
4.4K
increased by9.02%
Maintainers
5
Weekly downloads
 
Created
Source

Button

Import

  import Button from '@govuk-react/button';

Usage

Simple

<Button>My button text</Button>

With Icon

import { ButtonArrow } from '@govuk-react/icons';

<Button icon={<ButtonArrow />}>My button text</Button>

References:

  • https://design-system.service.gov.uk/components/button/
  • https://github.com/alphagov/govuk-frontend/blob/master/src/components/button/_button.scss

TODO:

  • Remove cascade styling for nested elements, specifically svg
  • Consider ensuring text colour automatically switches between black/white based on WCAG guidance

Properties

PropRequiredDefaultTypeDescription
buttonColourundefinedstringOverride for default button colour
buttonHoverColourundefinedstringOverride for default button hover colour,
which defaults to buttonColour darkened by 5%
buttonShadowColourundefinedstringOverride for default button shadow colour,
which defaults to buttonColour darkened by 15%
buttonTextColourundefinedstringOverride for default button text colour,
which defaults to govuk white
children'Button'nodeButton text
disabledfalseboolRenders a disabled button and removes pointer events if set to true
iconundefinednodeButton icon
startfalseboolRenders a large button if set to true

FAQs

Package last updated on 04 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc